{% extends "layout.html" %}
{% block content %}
{% load comments %}
{% get_comment_count for room as comment_count %}.
        <script src="{{ STATIC_PREFIX }}js/raphael-min.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{ STATIC_PREFIX }}js/paths-level{{ room.floor_id.level }}.js" type="text/javascript" charset="utf-8"></script>
        <script src="{{ STATIC_PREFIX }}js/init.js" type="text/javascript" charset="utf-8"></script>
        <div class="well span6 offset3">
          <ul class="breadcrumb">
            <li>
              <a href="/floor/{{ room.floor_id }}">Floor {{ room.floor_id.level }}</a>
              {% if title == "Room" %}
              <span class="divider">/</span>
            </li>
            <li>
              <a href="/room/{{ room.room_id }}">Room {{ room.room_id }}</a>
              {% endif %}
            </li>
          </ul>
          
          <!-- remove borders, backgrounds -->
          <ul class="thumbnails">
            <li class="span6">
              <div id="paper" class="well">
              </div>
              <!-- <a href="#" class="thumbnail">
                <img src="http://placehold.it/560x412&text={{ title }}%20{{ id }}" alt="">
              </a> -->
            </li>
          </ul>

          <div id="comments" class="span6" style="margin-left:0px;">

            <div class="post">
              <p>Post something on this {{ title|lower }}'s wall!</p>
				{% get_comment_form for room as form %}
				<table>
				  <form action="{% comment_form_target %}" method="post">{% csrf_token %}
					{{ form }}
					<input type="hidden" name="next" value="{{ request.path }}" />
					<tr>
					  <td colspan="2">
						<input style="width:10%;" class="pull-right btn btn-primary" type="submit" name="submit" value="Post!" />
						<!--input type="submit" name="preview" value="Preview"-->
					  </td>
					</tr>
				  </form>
				</table>
            </div>
			{% get_comment_list for room as comment_list %}
			{% for comment in comment_list %}
            <div class="comment well">
			  Comm# {{ comment.id }} <br/>
              {{ comment.comment }} <br/>
              Post at: {{ comment.submit_date }}
            </div>
			{% endfor %}

          </div>


        </div>
{% endblock %}
